Skip to content

Conversation

@ironAiken2
Copy link
Contributor

@ironAiken2 ironAiken2 commented Oct 20, 2025

Resolves #4220 (FR-1426)

Changes

This PR implements conditional display of the terminal guide dialog based on the new copy-on-terminal feature support.

Key Changes

  1. Added copy-on-terminal feature flag

    • New feature flag for manager version 25.13.2+
    • Indicates support for clipboard copy via mouse selection in tmux
  2. Conditional terminal guide display

    • Terminal guide dialog now only shows when copy-on-terminal feature is NOT supported
    • Provides backward compatibility for older manager versions
    • Improves UX by removing unnecessary popup when copy feature is available
  3. Code organization

    • Moved reservoir feature flag to correct version section (25.12.0)

Files Changed

  • src/components/backend-ai-app-launcher.ts - Conditional terminal guide dialog display
  • src/lib/backend.ai-client-esm.ts - Added feature flags for version compatibility

Background

With the new copy-on-terminal feature (manager v25.13.2+), users can copy text by simply selecting it with the mouse when tmux mouse setting is enabled. This makes the terminal guide popup unnecessary for newer versions.

Checklist:

  • Documentation
  • Minimum required manager version: 25.13.2 for copy-on-terminal feature
  • Specific setting for review: Test with both old and new manager versions
  • Minimum requirements to check during review: Verify guide shows only on older versions
  • Test case: Terminal guide should not appear with manager v25.13.2+, should appear with older versions

@github-actions github-actions bot added area:lib Library and SDK related issue. size:XS ~10 LoC labels Oct 20, 2025
Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ironAiken2 ironAiken2 marked this pull request as ready for review October 20, 2025 05:57
Copilot AI review requested due to automatic review settings October 20, 2025 05:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR conditionally displays the terminal guide dialog based on whether the Backend.AI manager supports the new copy-on-terminal feature (version 25.13.2+). When the feature is supported, the guide dialog is suppressed since users can copy text directly via mouse selection in tmux, eliminating the need for instructional popup.

Key changes:

  • Added copy-on-terminal feature flag for manager version 25.13.2+
  • Modified terminal guide dialog to display only when copy-on-terminal is not supported
  • Corrected placement of reservoir feature flag to version 25.12.0

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/lib/backend.ai-client-esm.ts Added copy-on-terminal feature flag and repositioned reservoir flag to correct version block
src/components/backend-ai-app-launcher.ts Added conditional check to show terminal guide only when copy-on-terminal is unsupported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +1551 to +1552
!globalThis.backendaiclient.supports('copy-on-terminal') &&
this.terminalGuideDialog.show();
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Using the && short-circuit operator for a conditional action reduces readability. Consider using an explicit if statement: if (!globalThis.backendaiclient.supports('copy-on-terminal')) { this.terminalGuideDialog.show(); }

Suggested change
!globalThis.backendaiclient.supports('copy-on-terminal') &&
this.terminalGuideDialog.show();
if (!globalThis.backendaiclient.supports('copy-on-terminal')) {
this.terminalGuideDialog.show();
}

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:lib Library and SDK related issue. size:XS ~10 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review and remove terminal(ttyd) guidance modal if unnecessary

2 participants